package com.crawler.crane;

import com.cip.crane.client.ITaskHandler;
import com.cip.crane.client.ScheduleManager;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by tongtao.zhu on 2017/3/24.
 */
public class CraneTest {
    public void run() throws Exception {
        ScheduleManager manager = new ScheduleManager();
        manager.setTaskAcceptorPort(8410);  //可以为空 非空范围在8410（含）~8430（含） 默认为8410
        manager.setTaskCallBackPort(8383);//此端口一般不会变
        Map<String, ITaskHandler> jobs = new HashMap<String, ITaskHandler>();
        jobs.put("akka-cluster-crawlertaobao", new TaskHandlerExemple());
        manager.setInitedJobs(jobs);
        manager.init();
    }
}
